Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Example for Beaglebone Black #169

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

single9
Copy link

@single9 single9 commented Dec 4, 2015

Hi,

I write a program for Beaglebone Black developer. This program provide a way to help BBB developer easy to use this library in Node.JS.

Please forgive me if I make any errors; my English is a little weak.

@TMRh20
Copy link
Member

TMRh20 commented Dec 13, 2015

FYI just wanted to say thanks for this and that I've been meaning to look closer at this and will test it out soon.

@chgerwig
Copy link

I do not understand the numbering of the pins in combination with the Beagle Bone Black. It worked with an old library (https://github.com/mlsorensen/RF24.git) with 115. It does not work with this library and the same number. What has changed?

@single9
Copy link
Author

single9 commented Jan 30, 2016

Because pin number 115 didn't work with my BBB. I change it to 59 (P9_16).

@TMRh20
Copy link
Member

TMRh20 commented Apr 21, 2016

With the recent makefile and example directory changes, could this be moved to the examples_linux directory and somehow included with the general linux examples? Apologies for taking so long to get this included.

@martin-mat
Copy link
Collaborator

cli is a great idea, and it's generic, not only BBB related. Best if it is more configurable (RF24 constructor as cli params). It has been a while since author posted it, so if he's not around I can take it to adapt and merge.

@single9
Copy link
Author

single9 commented Apr 22, 2016

Since I'm busy recently. I don't have enough time to do this. I'm very sorry. If @mz-fuzzy can help, I will appreciate it.

@single9
Copy link
Author

single9 commented Apr 22, 2016

OK, I think I still want to do it by myself... XD

OMG! I forgot set my new BBB's global config. It is as root now... :(

@martin-mat
Copy link
Collaborator

ok, my comments then:

  • arguments of RF24 constructor would be good to have configurable as cli params, not hardcoded
  • I think there is no reason why this tool should be presented as bbb-specific, it's a generic tool for rf24 modules without any binding to bbb
  • also name of the tool should not contain bbb, it could be named like rf24ctl

@single9
Copy link
Author

single9 commented Apr 22, 2016

Hmmm... Thanks your advice but I really don't have more time to make it become a better tool... :(

@TMRh20
Copy link
Member

TMRh20 commented Apr 23, 2016

@single9 Maybe do what you can, and it can be added to later?

@single9
Copy link
Author

single9 commented Apr 23, 2016

I will try.

@Avamander
Copy link
Member

@single9 Any updates?

@2bndy5
Copy link
Member

2bndy5 commented Nov 22, 2020

I've been thinking about adding a argParse.h for the new examples (python ships with standard argparser library).

I'm afraid of making the Linux examples too complicated to read for C++/python noobs, but it could also provide a way to use the rf modules without needing to understand the API (i.e. one-off use in openHab). My idea is that:

  1. If an arg is specified, then attempt 1 OTA transaction
  2. If no arg is specified, then continue with example as normal.

My idea for args is as follows

Short Long description
-c --ce_pin CE pin number
-C --csn_pin CSN pin number
-a --no_ack disable auto-ack
for multicasting
-A --use_ack_payload enable ACK payload feature and
dynamic payloads consequently
-w --w_address address for TX pipe
-rX --r_addressX address RX pipe X
-b --buffer TX payload (as a string)
-BX --bufferX load ACK payload for RX pipe X
-t --timeout timeout to RX or TX
depending which type of buffer
is specified (-b or -BX)

Notice I plan on using the length of the payload string to payloadSize() when not using an ACK payload.

I like the usefulness of this PR, but it seems to have gone stale (& outdated). I'm using this thread to avoid opening yet another issue (or would that actually be preferred?).

@TMRh20
Copy link
Member

TMRh20 commented Nov 23, 2020 via email

@2bndy5
Copy link
Member

2bndy5 commented Nov 23, 2020

yea, that's what I was originally thinking, but then I didn't stop thinking and over-thought it... (common quaratine-time problem).

How bout we let the Multiceiver example (or maybe all examples if it turns out less complicated than I'm foreseeing) take a radioNumber (actually called nodeID in Multiceiver code) & role CLI args. That should be both simple for newcomers and convenient for automated testing. The complications arose after I thought about ACK payloads...

BTW I've been reading up on the python std lib argparse, and it is very impressive. We could use sub-categories of args like git does!
ex:
rf24_cli.py tx -p 1Node -b buffer for TX mode (using address "1Node" and sending "buffer")
or
rf24_cli.py rx -p1 1node -t 1000 for RX mode (using pipe 1 and listening for 1 second).

I'll shelve the CLI tool idea till after pyRF24 is up & running

@TMRh20
Copy link
Member

TMRh20 commented Nov 23, 2020 via email

@2bndy5 2bndy5 marked this pull request as draft January 17, 2023 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants